﻿<local:BaseWindow
    x:Class="LenovoLegionToolkit.WPF.Windows.Utils.SymbolRegularPicker"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:LenovoLegionToolkit.WPF.Windows"
    xmlns:resources="clr-namespace:LenovoLegionToolkit.WPF.Resources"
    xmlns:utils="clr-namespace:LenovoLegionToolkit.WPF.Utils"
    xmlns:wpfui="http://schemas.lepo.co/wpfui/2022/xaml"
    Title="{x:Static resources:Resource.SymbolRegularPicker_Title}"
    Width="800"
    Height="600"
    Closing="SymbolRegularPicker_Closing"
    ExtendsContentIntoTitleBar="True"
    FlowDirection="{x:Static utils:LocalizationHelper.Direction}"
    Loaded="SymbolRegularPicker_Loaded"
    ResizeMode="CanMinimize"
    ShowInTaskbar="False"
    WindowStartupLocation="CenterOwner">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <wpfui:TitleBar
            Grid.Row="0"
            CanMaximize="false"
            ShowMaximize="false"
            ShowMinimize="false"
            UseSnapLayout="false" />

        <Grid
            Grid.Row="0"
            Height="24"
            Margin="12,8,12,8">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>

            <TextBlock
                Grid.Column="0"
                VerticalAlignment="Center"
                FontSize="12"
                IsHitTestVisible="False"
                Text="{x:Static resources:Resource.SymbolRegularPicker_Title}" />
        </Grid>

        <wpfui:TextBox
            x:Name="_filterTextBox"
            Grid.Row="1"
            Margin="16"
            Icon="Search24"
            PlaceholderEnabled="True"
            PlaceholderText="{x:Static resources:Resource.Filter}"
            TextChanged="FilterTextBox_TextChanged" />

        <wpfui:VirtualizingItemsControl
            x:Name="_itemsControl"
            Grid.Row="2"
            Margin="4,4,0,0"
            CacheLengthUnit="Pixel" />

        <Grid Grid.Row="3" Margin="16">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>

            <wpfui:Button
                Grid.Column="1"
                MinWidth="100"
                Margin="8,0,0,0"
                Click="DefaultButton_Click"
                Content="{x:Static resources:Resource.Default}" />
        </Grid>

    </Grid>
</local:BaseWindow>
